package com.ytjj.common.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author jiawei
 * @date 2024年06月04日 16:08
 * @describe duanxing 系统发送短信类型
 */

@AllArgsConstructor
@Getter
public enum MsgTypeEnum {
    VERIFICATION_CODE(1, "验证码"),
    ORDER_SMS(2, "下单短信"),
    ASSESSMENT_REVIEW_PASSED(3, "测评审核通过"),
    EVALUATION_REVIEW_FAILED_FOR_ZERO(4, "测评审核未通过(0元试用商品)"),
    EVALUATION_REVIEW_FAILED_FOR_NON_ZERO(5, "测评审核未通过(非0元试用商品)"),
    SHIPPING_SMS(6, "发货短信"),
    MANUAL_SENDING_BY_API(7, "手动调用接口api发送短信的类型"),
    MANUAL_SENDING_BY_PLATFORM(8, "来源短信管理发送短信"),
    SUPPLEMENTARY_TYPE(9, "补单短信类型"),
    AFTER_SALES_ORDER_REVIEW(10, "售后单审核短信"),
    WECHAT_ALIPAY_SEND(11, "微信支付宝回复发送短信"),
    EXPRESS_EXCEPTION(12, "快递物流异常发送短信类型");

    /**
     * 标识
     */
    private Integer code;

    /**
     * 描述
     */
    private String desc;

    /**
     * 获取枚举的键值对
     */
    public static Map<Integer,String> getAllMsgType() {
        MsgTypeEnum[] values = MsgTypeEnum.values();
        Map<Integer,String> msgTypeList = new HashMap<>();
        for (MsgTypeEnum value : values) {
            msgTypeList.put(value.getCode(), value.getDesc());
        }
        return msgTypeList;
    }
}
